package abstrac_class_and_interface;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Date;

public class TestCalender {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
			Calendar calendar = new GregorianCalendar();
			System.out.println("Year\tMonth\tDate\tHour\tHour24\tMinute\tSecond");
			System.out.println(calendar.get(Calendar.YEAR) + "\t" +
					calendar.get(Calendar.MONTH) + "\t" + calendar.get(Calendar.DATE)
					+ "\t" + calendar.get(Calendar.HOUR) + "\t" +
					calendar.get(Calendar.HOUR_OF_DAY) + "\t" +
					calendar.get(Calendar.MINUTE) + "\t" +
					calendar.get(Calendar.SECOND));
			System.out.print("Day of week: " +
					calendar.get(Calendar.DAY_OF_WEEK) + "\t");
			System.out.print("Day of month: " +
					calendar.get(Calendar.DAY_OF_MONTH) + "\t");
			System.out.println("Day of year: " +
					calendar.get(Calendar.DAY_OF_YEAR));
			System.out.print("Week of month: " +
					calendar.get(Calendar.WEEK_OF_MONTH) + "\t");
			System.out.print("Week of year: " +
					calendar.get(Calendar.WEEK_OF_YEAR) + "\n");
			Date today = new Date();
			System.out.println(today);
	}

}
